import { useUserStore } from '@/store/user'
const pages: Array<any> = [
  {
    path: '/about',
    name: 'About',
    component: () => import('@/views/about.vue'),
    meta: { title: '关于我们' },
    beforeEnter(_to: any, _from: any, next: Function) {
      const userStore = useUserStore()
      if(userStore.user.token) {
        next()
      } else {
        next('/login')
      }
    }
  },
]

export default pages